package action.album;

import service.AlbumService;
import bean.Album;

import com.opensymphony.xwork2.ActionSupport;

public class ModifyAlbumAction extends ActionSupport {
	private Album album;
	private AlbumService albumService;
	
	@Override
	public String execute() throws Exception {
		Album a=albumService.getAlbumById(album.getId());
		a.setDescription(album.getDescription());
		a.setTitle(album.getTitle());
		albumService.modifyAlbum(a);
		return SUCCESS;
	}

	public Album getAlbum() {
		return album;
	}

	public void setAlbum(Album album) {
		this.album = album;
	}

	public AlbumService getAlbumService() {
		return albumService;
	}

	public void setAlbumService(AlbumService albumService) {
		this.albumService = albumService;
	}
	
}
